{
  // check whether you can shoot
  if (not can_shoot) exit;
  can_shoot = false;
  // show the animation and play the sound
  image_speed = 0.4;
  image_index = 0;
  sound_play(crossbow);
  // determine what you hit
  var xx, yy, ii;
  xx = global.camx;
  yy = global.camy;
  repeat (50)
  {
    xx += 4*global.camcos;
    yy -= 4*global.camsin;
    ii = instance_position(xx,yy,obj_wall_basic);
    if (ii == noone) 
    {
      ii = instance_position(xx,yy,obj_monster_basic);
      if (ii == noone) continue;
      with (ii) instance_destroy();
      break;
    }
    if object_is_ancestor(ii.object_index,obj_plant_basic) continue;
    if (ii.object_index == obj_barrel) || (ii.object_index == obj_door) 
       with (ii) instance_destroy();
    break;
  }
}